import axios from 'axios';
class Request{
    static ajaxRequest(method='post',url,data,callback=()=>{}){
        this.webRequest(callback);
        return axios({
                      url: url,
                      method: method,
                      data: data
                  })
    }
    static webRequest (callback) {
        let myInterceptors = axios.interceptors.request.use(function (config) {
            callback();
            return config
        });
        return myInterceptors;
    }
}
export default Request;